# word = {"isSpecial": True, "word": "6お互い同時にドローできなくなりました", "trans": "6双方同时无法抽卡"}

from encodings import utf_8


def isSymbol(c: str) -> bool:
    symbols = set(['_', '\\', '\n', '-'])
    res = c in symbols
    return res


def getCharLen(c: str):
    return len(c.encode('utf-8'))


def getStringLen(s: str):
    return len(s.encode('utf-8'))
    res = 0
    for c in s:
        res += getCharLen(c)
    return res


def getLen(word: dict) -> int:
    # 特殊的就返回57
    if word['isSpecial']:
        return 57
    # 有翻译的
    # res = 0

    # for c in word['word']:
    #     res += getCharLen(c)
    # return res
    return getStringLen(word['word'])


# print(getLen({"isSpecial": False, "word": "加える", "trans": "守備表示\nに変更"}))

if __name__ == '__main__':
    print(getStringLen("\t\n\n\n\n"))
